﻿(function(E, T, $){
var selection = E.mod('Selection'),
	testName = 'JustifyLeft',
	title = '左对齐',
	setValue = ['默认对齐方式','左对齐方式', '居中对齐方式', '右对齐方式'],
	dom = null,
	node = null,
	cmds = [
		[1500, {fun: function() {
			dom = E.get('document');
			dom.body.innerHTML='<p id="_testJustifyLeft">'+setValue.join('</p><br/><p>')+'</p>';
			node = dom.getElementById('_testJustifyLeft');
			selection.selectNode(node,true);
			selection.selectedText(setValue[0]);
		}}],
		[500,{name : '#demo-JustifyLeft', type: 'mouseover'}],
		[500,{name : '#demo-JustifyLeft', type: 'click'}],
		[100, {fun: function() {
			selection.selectedText(setValue[1]);
		}}],
		[500, {name : '#demo-JustifyLeft .jqe-button-menu', type: 'click'}],
		[200, {name: '#jqe-JustifyLeft-0 li[menuname=JustifyLeft]', type: 'mouseover'}],
		[500, {name: '#jqe-JustifyLeft-0 li[menuname=JustifyLeft] a', type: 'click'}],
		[100, {fun: function() {
			selection.selectedText(setValue[2]);
		}}],
		[500, {name : '#demo-JustifyLeft .jqe-button-menu', type: 'click'}],
		[200, {name: '#jqe-JustifyLeft-0 li[menuname=JustifyCenter]', type: 'mouseover'}],
		[500, {name: '#jqe-JustifyLeft-0 li[menuname=JustifyCenter] a', type: 'click'}],
		[100, {fun: function() {
			selection.selectedText(setValue[3]);
		}}],
		[500, {name : '#demo-JustifyLeft .jqe-button-menu', type: 'click'}],
		[200, {name: '#jqe-JustifyLeft-0 li[menuname=JustifyRight]', type: 'mouseover'}],
		[500, {name: '#jqe-JustifyLeft-0 li[menuname=JustifyRight] a', type: 'click'}]
	];

T.addTest(testName, cmds, title);
})(jQEditor,AutoTest, jQuery)